package com.wss.day03.test2;

/**
 * @author wangshaoshuai
 * @desc TODO
 * @date 2025/4/22
 */
public class Manager extends Employee{
    private double bonus;
    public Manager(String name, String id, double pay, double bonus) {
        super(name, id, pay);
        this.bonus = bonus;
    }


    @Override
    public void addSalary() {
        double newPay = getPay() * 1.10 + bonus;
        setPay(newPay);
        System.out.println(getName() + "(经理)涨薪完成，新工资：" + newPay);
    }


    @Override
    public void show() {
        super.show();
        System.out.println("分红：" + bonus);
        System.out.println("职位：经理");
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
}
